/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package flp.gui.listener;

import javax.swing.JPanel;
import javax.swing.JRadioButton;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;

/**
 * Klasa nasluchujaca zmiany `skupienia` na radio przyciskach.
 * 
 * @author marek
 */
public class AlgorithmRadioChangeListener implements ChangeListener
{
    private JPanel panel;
    
    public AlgorithmRadioChangeListener(JPanel panel)
    {
        this.panel = panel;
    }
    
    @Override
    public void stateChanged(ChangeEvent e)
    {
        this.panel.setVisible(((JRadioButton)e.getSource()).isSelected());
    }
}
